const useAppStore = defineStore('app', {
  state: () => ({
    // 时间点
    timePoint: 0,
    // 波形图指标默认值
    currentChartForm: null,
    routerViewShow: true
  }),
  actions: {
    setTimePoint(timePoint) {
      this.timePoint = timePoint
    },
    setChartDefault(currentChartForm) {
      this.currentChartForm = currentChartForm
    },
    // 刷新路由
    refreshRouterView() {
      this.routerViewShow = false
      nextTick(() => {
        this.routerViewShow = true
      })
    }
  }
})

export default useAppStore
